/* Copyright (c) 2009-2010, Sean A.O. Harney <sharney3@gmail.com> */

#ifndef FUZZER_SMAPS_H
#define FUZZER_SMAPS_H


// smaps since 2.6.14 according to proc(5) man page.
#ifdef OS_LINUX
#include <linux/version.h>
#if LINUX_VERSION_CODE >=  KERNEL_VERSION(2, 6, 14)
#define HAVE_SMAPS 1
#else
#undef HAVE_SMAPS
#endif
#endif

//all 3 in kB
struct st_memusage {
    unsigned int size;
    unsigned int rss;
    unsigned int pss;
};

/* prototypes */
bool memusage_init();
bool get_memusage(pid_t pid, struct st_memusage *retval);


#endif				/* FUZZER_SMAPS_H */
